﻿using System;

class Trapezoid
{
    static void Main()
    {
        //Exercise 8.
        //Write an expression that calculates trapezoid's area by given sides a and b and height h.

        Console.Write("Please enter side a: ");
        decimal sideA = decimal.Parse(Console.ReadLine());
        Console.Write("Please enter side b: ");
        decimal sideB = decimal.Parse(Console.ReadLine());
        Console.Write("Please enter height h: ");
        decimal heightH = decimal.Parse(Console.ReadLine());        
        decimal area = ((sideA + sideB) / 2) * heightH;
        Console.WriteLine("The trapezoid's area is: {0:0.00}.", area);
    }
}

